Implementation techniques for Prolog
نویسنده
چکیده
This paper is a short survey about currently used implementation techniques for Prolog. It gives an introduction to uniication and resolution in Prolog and presents the memory model and a basic execution model. These models are expanded to the Vienna Abstract Machine (VAM) with its two versions, the VAM 2P and the VAM 1P , and the most famous abstract machine, the Warren Abstract Machine (WAM). The continuation passing style model of Prolog, binary Prolog, leads to the BinWAM. Abstract interpretation can be applied to gather information about a program. This information is used in the generation of very specialized machine code and in optimizations like clause indexing and instruction scheduling on each kind of abstract machine.
منابع مشابه
Uppsala Theses in Computing Science 26 Compilation Techniques for Prolog Compilation Techniques for Prolog
Current Prolog compilers are largely limited to optimizing a single predicate at a time. We propose two methods to express the global control of Prolog programs. The rst method transforms a Prolog program into a continuation-passing style, where all operations have explicit success and failure continuations. The second method directly constructs a control ow graph from the Prolog program. This ...
متن کاملAdding equations to NU-Prolog
This paper describes an extension to NU-Prolog which allows evaluable functions to be deened using equations. We consider it to be the most pragmatic way of combining functional and relational programming. The implementation consists of several hundred lines of Prolog code and the underlying Prolog implementation was not modiied at all. However, the system is reasonably eecient and supports cor...
متن کاملQD-Janus: a Sequential Implementation of Janus in Prolog
Janus is a language designed for distributed constraint programming. This paper describes QDJanus, a sequential implementation of Janus in Prolog. The compiler uses a number of novel analyses and optimizations to improve the performance of the system. The choice of Prolog as the target language for a compiler, although unusual, is motivated by the following: (i) the semantic gap between Janus a...
متن کاملDesign and Implementation of a Prolog-to-C Compiler
A WAM-based Prolog-To-C (PTC) compiler is described. It is written in the C language and used together with Paralogic's Prolog interpreter. Prolog programs may consist of several independently compiled modules. The principles of modularization are described. Mixed programming features (Prolog-C and CProlog programming interfaces) are also explained. The PTC compiler is portable and has been por...
متن کاملTechniques for Verifying Prolog Implementations
This paper presents some techniques that reduce the complexity of the verification of Prolog implementations. Two key techniques are stepwise refinements and bisimulation. The method of stepwise refinements captures various optimization techniques employed in the implementation process. The correctness of each refinement is justified using a notion called bisimulation. Our definition of bisimul...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1994